package com.justnow.offer;


import java.util.*;

/**
 * @author justnow
 * Created on 2020-09-16
 * Description
 */
public class Dianxin02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char[] chars = str.toCharArray();
        Map<Character, Integer> map = new HashMap<>();
        for (char aChar : chars) {
            if (!map.containsKey(aChar)) {
                map.put(aChar, 1);
            } else {
                map.put(aChar, map.get(aChar) + 1);
            }
        }
        List<Integer> list = new ArrayList<>();
        for (Integer value : map.values()) {
            list.add(value);
        }
        Collections.sort(list);
        int min = list.get(0);
        StringBuilder stringBuilder = new StringBuilder();
        for (char aChar : chars) {
            if (map.get(aChar) != min) {
                stringBuilder.append(aChar);
            }
        }
        System.out.println(stringBuilder.toString());
    }
}
